home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!etchq.demon.co.uk
- From: MushyPea <MushyPea@etchq.demon.co.uk>
- Newsgroups: comp.sys.amiga.programmer
- Subject: Filtering stdio before passing to a program
- Date: Tue, 20 Feb 96 18:09:51 GMT
- Message-ID: <9602201809.AA0024f@etchq.demon.co.uk>
- X-NNTP-Posting-Host: etchq.demon.co.uk
- X-Newsreader: ADMaN 1.7 Copyright 1995 S.T.Brown
- X-Mail2News-Path: disperse.demon.co.uk!post.demon.co.uk!etchq.demon.co.uk
-
- Hi there, ppl,
-
- Problem:
- ~~~~~~~~
- I have a program, written for the Amiga, that uses stdio. It *insists* that
- all lines are terminated with only a line feed, and not a carriage return -
- which is not a problem if the program is only being run on an Amiga, but I
- actually want to run this program as a telnet session from a remote computer,
- ie. the remote computer is running the program on my Amiga and all i/o
- happens at their end. However, every other computer out there seems to send
- the CR+LF combination at the end of the line, which upsets the program I am
- trying to run.
-
- Solution?:
- ~~~~~~~~~~
- What I'd like to do is run a utility that takes information from it's own
- stdin, filters out the CR codes, and passes the input on to my other
- program's stdin. Also, the stdout from the other program would need to be
- passed through to the stdout of the utility. (with CR's added back in?)
-
- Other uses:
- ~~~~~~~~~~~
- I guess that a similar program could be used to add macros or abbreviations
- to any other program that utilises stdio...
-
- What I'd like:
- ~~~~~~~~~~~~~~
- Firstly, I'd like suggestions on how to go about writing a program that does
- this, since I'd enjoy the challenge of writing it myself - assembler only,
- please!
-
- Secondly, I'd like any source code that performs the same function, again, in
- assembler please.
-
- Lastly, if there is already a utility out there that does this (*I* can't
- find one), then let me know where it is.
-
-
-
-
- I'd be really grateful for any ideas on this one...
-
-
-
- Thanks in advance.
-
- --
- MushyPea/EtCetera (Ian Marsh) [680x0 coder, musician] ___MMM___
- Internet: MushyPea@etchq.demon.co.uk (EtCetera HQ) (O O)
- A1200 030-50MHz 2Mb+8Mb SCSI-II 1700MbHD 3xCD 28800Vfc ---oOO--(_)--OOo---
- KS3.0 / AmiTCP v4.0 / GoldED v3 / PGP v2.6ui / ADMaN v1.7
-